package com.itheima.health.dao;

import com.itheima.health.pojo.CheckGroup;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @Author: liangWeiQUQ
 * @Description: TODO
 * @DateTime: 2021/2/26 23:03
 **/
public interface CheckGroupDao extends Mapper<CheckGroup>{
    @Select("SELECT t3.* FROM t_setmeal t1 JOIN t_setmeal_checkgroup t2 ON t1.id = t2.setmeal_id " +
            "JOIN t_checkgroup t3 ON t2.checkgroup_id = t3.id WHERE t1.id = #{id}")
    List<CheckGroup> findBySetmealId(Integer id);
}
